//
//  HomeVcTypeTitleView.m
//  WGFGlobalHouses
//
//  Created by welldone on 15/5/8.
//  Copyright (c) 2015年 waiguofang. All rights reserved.
//

#import "HomeVcTypeTitleView.h"


@implementation HomeVcTypeTitleView
@synthesize rightBtn;



-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        
        
//        UIView *leftView = [[UIView alloc]initWithFrame:CGRectMake(10, frame.size.height/2-10, 94+8, 20)];
        
//        UIImageView *leftImg = [[UIImageView alloc]initWithFrame:CGRectMake(0,0,94,20)];
//        [leftImg setImage:[UIImage imageNamed:@"index_top_logo"]];
//        [leftView addSubview:leftImg];
//        [self addSubview:leftView];
        UILabel *label = [UILabel new];
        CGFloat labH = 21;
        CGFloat labW = 120;
        CGFloat labX = (self.frame.size.width - labW)/2.0;
        CGFloat labY = (self.frame.size.height - labH)/2.0;
        label.frame = CGRectMake(labX, labY, labW, labH);
        label.backgroundColor = [UIColor clearColor];
        label.font = [UIFont fontWithName:@"TrebuchetMS-Bold" size:17];
        label.textColor = [UIColor whiteColor];
        label.text = @"全球房源库";
        label.textAlignment = NSTextAlignmentCenter;
        [self addSubview:label];
        
        UIView *rightView = [[UIView alloc]initWithFrame:CGRectMake(frame.size.width-50,0,44, frame.size.height)];
        rightBtn  = [[UIButton alloc]initWithFrame:CGRectMake(0,0,50,frame.size.height)];
        [rightBtn setImage:[UIImage imageNamed:@"icon29"] forState:UIControlStateNormal];
        [rightBtn setImageEdgeInsets:UIEdgeInsetsMake(frame.size.height/2-24/2, 20, frame.size.height/2-24/2, 10)];
        [rightView addSubview:rightBtn];
        [self addSubview:rightView];
        
        UIView *leftView = [[UIView alloc]initWithFrame:CGRectMake(0,0,44, frame.size.height)];
        self.leftBtn  = [[UIButton alloc]initWithFrame:CGRectMake(0,0,50,frame.size.height)];
        [self.leftBtn setImage:[UIImage imageNamed:@"meunbei_ixon"] forState:UIControlStateNormal];
        [self.leftBtn setImageEdgeInsets:UIEdgeInsetsMake(frame.size.height/2-24/2, 20, frame.size.height/2-24/2, 10)];
        [leftView addSubview:self.leftBtn];
        [self addSubview:leftView];
        
    }
    
    return  self;
}


@end
